#################################################################################
#Title: Divisive Jobs
#Author: Raluca L. Pahontu
#################################################################################

rm(list=ls())

library(foreign)
library(ggplot2)
library(scales)
library(devtools)
library(effects)
library(coefplot)
library(dplyr)
library(reshape2)
library(readstata13)

setwd("yourpath")


sink("analysis_logr.log")
#--------------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------------

# Main Text Figures 

#--------------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------------

source("2-fig1.R", echo=TRUE, max.deparse.length=Inf) #Produces Figure 1
source("3-fig2.R", echo=TRUE, max.deparse.length=Inf) #Produces Figure 2
source("4-fig3.R", echo=TRUE, max.deparse.length=Inf) #Produces Figure 3
source("5-fig4.R", echo=TRUE, max.deparse.length=Inf) #Produces Figure 4

#--------------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------------

# Supplementary Appendix Figures 

#--------------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------------

source("6-figd2.R", echo=TRUE, max.deparse.length=Inf) #Produces Figure S2
source("7-figd3.R", echo=TRUE, max.deparse.length=Inf) #Produces Figure S3
source("8-figd4.R", echo=TRUE, max.deparse.length=Inf) #Produces Figure S4
source("9-figd5.R", echo=TRUE, max.deparse.length=Inf) #Produces Figure S5
source("10-figd6.R", echo=TRUE, max.deparse.length=Inf) #Produces Figure S6
source("11-figd7.R", echo=TRUE, max.deparse.length=Inf) #Produces Figure S7
source("12-figd8.R", echo=TRUE, max.deparse.length=Inf) #Produces Figure S8
source("13-figd9.R", echo=TRUE, max.deparse.length=Inf) #Produces Figure S9

sink()


